<template name="memberlist"> {{#if docrop}}{{> member_crop}} {{else}} 
<h2 class="sub-header">
	Mitarbeiter <span class="badge">{{member_count}}</span> <label class="showall"> Show All 
	<input type="checkbox" data-toggle="toggle" checked="{{show_all}}" />
	</label> 
</h2>
<div class="table-responsive">
	<form class="new-member">
		<table class="table .table-condensed">
			<thead>
				<tr>
					<th> Photo </th>
					<th> Vorname </th>
					<th> Name </th>
					<th> Mobile </th>
					<th> Gruppe </th>
				</tr>
			</thead>
			<tbody>
				{{#each members}} {{> memberlist_row}} {{/each}} 
			</tbody>
		</table>
	</form>
</div>
<a class="btn btn-default" href="/vcard" role="button">Download vCard</a>

{{/if}} </template> 
<!--  ..................................................................... MEMBER ROW -->
<template name="memberlist_row"> 
<tr class="{{gender}}" id="{{_id}}">
	<td class="crop"> <img src="{{thumb}}" height="90" /> </td>

	{{#if doedit}} 
	<td> 
	<input type="text" class="form-control firstname" value="{{first}}" />
	</td>
	<td> 
	<input type="text" class="form-control lastname" value="{{last}}" />
	</td>
	<td> 
	<input type="text" class="form-control phone" value="{{tel}}" />
	</td>
	
	
	<td class="smalltext"> {{group}}
	   {{#if show_all}} | 
	       <input type="text" class="form-control project" value="{{project}}" />
	   {{/if}} 
	</td>
	<td><button class="delete"> &times; </button> <button class="save"><i class="fa fa-save"></i></button> </td>
	{{else}} 
	<td> {{first}} </td>
	<td> {{last}} </td>
	<td> {{tel}} </td>
	<td class="smalltext"> <ul style="list-style-type:none">{{#each groupNames}}
	<li style="padding:2px"><span class="badge">{{title}}</span></li>
	{{/each}}
	</ul>
	{{#if show_all}} | {{project}} {{/if}}</td>
	<td><button class="setFemale"><i class="fa fa-female"></i></button> <button class="setMale"><i class="fa fa-male"></i></button> <button class="delete"> &times; </button> <button class="edit"><i class="fa fa-edit"></i></button> </td>
	{{/if}} 
</tr>
</template> 